<template>
	<view class="page">
		<button @click="showElm()">elm红包弹窗</button>
		<button @click="showMt()">mt红包弹窗</button>
		<button @click="showMoney()">金币</button>
		<button @click="showRedbag()">红包</button>
		<ELM ref="elm" :dataInfo="info"></ELM>
		<MT ref="mt" :dataInfo="info" ></MT>
		<Mony ref="money" :time="time"></Mony>
		<Redbag ref="redbag" :time="time"></Redbag>
	</view>
</template>

<script>
	import ELM from "@/components/elm/index.vue"
	import MT from "@/components/mt/index.vue"
	import Mony from "@/components/money/index.vue"
	import Redbag from "@/components/redbag/index.vue"
	export default {
		components:{
			ELM,
			MT,
			Mony,
			Redbag
		},
		data() {
			return {
				// 秒
				time:5,
				info:{
					title:"测试标题",
					money:39.5,
					startTime:1,
					list:[
						{
							name:"测试红包",
							min:40,
							money:3,
							decimal:5
						},
						{
							name:"测试红包",
							min:40,
							money:3,
							decimal:5
						},
						{
							name:"测试红包测试红包",
							min:69,
							money:10,
							decimal:null
						},
						{
							name:"测试红包测试红包",
							min:69,
							money:10,
							decimal:null
						},
						{
							name:"测试红包测试红包",
							min:69,
							money:10,
							decimal:null
						}
					]
				}
			}
		},
		onLoad() {

		},
		methods: {
			// elm弹窗
			showElm(){
				this.$refs.elm.showDialog();
			},
			// mt弹窗
			showMt(){
				this.$refs.mt.showDialog();
			},
			// 金币弹窗
			showMoney(){
				this.$refs.money.showDialog();
			},
			// 红包弹窗
			showRedbag(){
				this.$refs.redbag.showDialog();
			}
		}
	}
</script>

<style scoped lang="scss">
	.page button{
		margin: 20rpx;
	}
</style>
